[arrays] use Array#slice to copy an array. Fixes #41