Creating multiple boolproperty checkboxes from an array

I am making an addon.
I read the subdirectories in the blend file root.

    root = bpy.path.abspath("//")
    for item in os.listdir(root):


I want to make a checkbox in my addon’s panel’s GUI for each subdirectory so I can select which subdirectories I want to copy over when I copy the blendfile.

I have tried an array:

a[b] = BoolProperty(
    description ="", 

in a loop to try and assign the boolproperties but it doesn’t like it. and I can’t find any examples of this on the web.

Any ideas or other ways of doing this would be welcome.