Fix bug where shuffle() was destroying the incoming array.
Merge branch 'hotfix/fix-shuffle-destroying-array'