Static Random numbers

I’m creating a pool draw/bracket for our pool night.
I have a name entry sheet where the number of players is entered and then the names are chosen from a dropdown list. When the right number of players is selected I need a random number beside each name with no duplicates, and if 12 players (in D2) then 1-12 only.
=IF(L10=“yES”,SORTBY(SEQUENCE(D2),RANDARRAY(D2)),"")
These numbers are then used on other sheets (17 sheets for 8 to 24 players) to populate the brackets with players names from a vlookup function in a set order for each draw with byes etc
The program is basically done but for the random number function being volitile and rendering the bracket sheets useless with the names changing all the time.
Is there a way to have the numbers remain static (a RANDARRAY.NV would be good).
Any help to quench my headache with this conundrum appreciated.