but with this many variants, it would be a long list
Not so long, probably. If you're counting the probability in percent, then it's no more than 100 entries long.
Theoretically, the random_p() funtion can draw with probabilities, but other than the random generator, it will not care for the actual proportions. That means, you would have the likely deviations from each probability within statistical likelihood. The ranom generator with 100 codes is -in my opinion - a much more reliable option.