Don't copy the typed array data if unnecessary

The slice method copies the ArrayBuffer data in a new array.