1. A computer-implemented method, comprising: receiving first code having a program loop implemented with scalar instructions to store values of a first array to a second array based on corresponding values of a third array, an address of the third array to be received from a caller of the program loop; and generating second code representing the program loop using at least one vector instruction, the second code including a shuffle instruction to shuffle elements of the first array based on corresponding elements of the third array using a shuffle table in parallel, including comparing elements of the third array with a predetermined threshold, generating a comparison result, and generating a mask based on the comparison result, the elements of the first array to be shuffled based on the mask, a blend instruction to blend the shuffled elements of the first array using a blend table in parallel, and a store instruction to store the blended elements of the first array in the second array.