Make cgen_array_copy work with record arrays
Test passing record arrays to function