Arduino Arrays

Hi Arduino users,

Right now I'm writing a code such that the Arduino will use Serial.read to read an array. Afterwards, I will put the elements in this first array and then put them into a 2nd array. My question is what the right way to do this is. Am I supposed to use a for loop to do this or is there a different way? Thanks.

Why not put them in the array directly?

if (Serial.available() > (arrayLength-1) ) { // got all the data?
for (x = 0; x<arrayLength; x=x+1){
dataArray1[x] = Serial.read();
dataArray2[x] = dataArray1[x];
}
}