arrays: Add documentation, stricter tests

Add some documentation to clarify the intended return value. It isn't always obvious that the return value should be the array. Given that Array#push(), for example, returns the length.

And stricter tests to make sure a copy is returned when expected, and in other case the original was affected.