Don't reimplement std::copy().

Using `std::copy()` potentially makes available helpful checks in debug mode and can also lead to faster code by e.g. calling `memcpy()` in release mode. Also, it expresses what is done more clearly than a handwritten loop and is shorter.
The `<algorithm>` header was already included.