how to apply a boolean modifier to a collection
I think the best way to achieve something like what you are trying to do, is using the Bool Tool add-on.
Activate the Bool Tool add-on (ships with Belender) by checking its box in the Preferences window.
In the 3D Viewport press N, click the Edit tab and click on Bool Tool to extend the menu, if it isn't already.
Then right click the collection in the Outliner window and choose Select Objects.
In the 3D Viewport Shift select the target object (so the collection objects and the target object are selected), and click on the desired boolean operation in the Bool Tool menu. For instance: Brush Boolen Difference.