move array copies to array.c