An Intersection function on lists that saves intersection positions
I'll take "... give something like..." to mean we can take some liberties with output format.
myFn=Merge[KeyIntersection[PositionIndex /@ {##}], Identity]&;
will produce an association with the desired information, works with any number of lists.
l1 = {a, b, c, a};
l2 = {d, c, a, c};
l3 = {z, d, d, a, c, k};
myFn[l1,l2,l3]
<|a -> {{1, 4}, {3}, {4}}, c -> {{3}, {2, 4}, {5}}|>
Simple-minded solution:
intersectionPositions[ls__List] :=
GroupBy[Flatten[Outer[{#2, Flatten[Position[#1, #2]]} &,
{ls}, Intersection[ls], 1], 1], First -> Last]
intersectionPositions[{a, b, c, a}, {d, c, a, c}]
<|a -> {{1, 4}, {3}}, c -> {{3}, {2, 4}}|>
intersectionPositions[{a, b, c, a}, {d, c, a, c}, {z, d, d, a, c, k}]
<|a -> {{1, 4}, {3}, {4}}, c -> {{3}, {2, 4}, {5}}|>
l1 = {a, b, c};
l2 = {b, c, e};
l3 = Intersection[l1, l2]
{#, Flatten[Position[l1, #]], Flatten[Position[l2, #]]} & /@ l3