Implement knuth shuffle.