memcpy(array2+a, array1+x, 3 * sizeof(*array1));
OP said data type was bytes (Reply #3). Regardless, OP seems long-gone from this thread.
memcpy(array2+a, array1+x, 3 * sizeof(*array1));
OP said data type was bytes (Reply #3). Regardless, OP seems long-gone from this thread.