chore(shallowCopy): handle arrays and primitives, and switch to using it where possible

In many cases, we want a shallow copy instead of a full copy

Closes #7618