This is an actual use case, that I thought I could just try with ChatGPT before even thinking what is the best way to shuffle. I was using a slightly more hard-coded version but ChatGPT gave a more general solution.