Fix copy with typed arrays

Creating a new `Uint8Array` from the `this.buffer` doesn't work if `subarray` had previously been used (e.g. `slice`), since `this.buffer` still would refer to the start of the buffer, not the start of the subarray. We can use `subarray` here instead, which keeps previous subarray indices intact. I was getting weird behavior in 2.1.7 otherwise.