The script I provided does not use random letters (unless it runs out!).

The first mapping will always be made to "Q:", the second will always be "R:", the third to "S:" and so-on. These are mapped in the order that they are encountered in the script.

This solution fits your needs exactly, and will scale to any number of groups (unless you run out of letters!)

Your only issue is ordering the mappings in the script so that the right drive gets mapped to Q:

FWIW I have a similar issue which means that I am changing our methodology to a single drive mapping with all department directories visible, and using permissions to control access. This creates some headaches - mainly with templates - but is far simpler in the end.