remove usage of Array.prototype.slice

`slice` should be replaced with a `slice` helper to ensure dense arrays are returned.