Add support for custom random number generator to shuffle()