Vectorizing crossover for loop