The implementation of shuffle is a pure function, so it returns a new array instead of shuffling the input in place.