Eliminating of consecutive columns with the same values, in two separate vectors with same length and dependant on that accordingly for for a third vector with same length

XYZ=unique(e->first(e,2),zip(x,y,z))