Or you could put all the update and draw stuff in a function which takes two arrays as input.
Then in the main loop you call this function with array1,array2 and then call it again with array2,array1.
Then in the main loop you call this function with array1,array2 and then call it again with array2,array1.