Create groups named after each folder. Generate a list of folders a user belongs to and map according to that folder name. This way the code doesn't change and the mappings are controlled by assigning users to groups within Windows instead of within the script.
_________________________
There are two types of vessels, submarines and targets.