Introduce a `shuffle' utility function.