Um, the "Knuth Shuffle" aka "Fisher-Yates" ?
https://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle