typeSafeIntersect function

Intersect two vectors without changing their data types.