Modify copy method

Swift`s array type is implemented as structures.
This means that array is copied when it is passed to a function or method.