Added array.copy function