Shorten code for getModifiedArrayCopy