shallowCopy for arrays