QUESTION QUICKLY: how save an array to another array

Drogon:
memcpy() copy all the bytes

I do not want to copy all bytes only the bytes that interest me from the array.

get the value of x,y,z position of array 1 and copy it into array 2 in the position a,b,c

array2[a] = array1[x];
array2[b] = array1[y];

etc etc etc though this does sound to me like an XY problem.