RTS style, select resources and idle worker will collect said resources help

Hello everyone, in dire need of some help with this one, been trying to figure it out for a few days now.
I have a marquee select, which I can select resources, and store them in an array. This is done in the HUD, I also get available units that are spawned and stored in an array. I have a behaviour tree set up.

But my trouble is trying to get the available units to collect the resources that are stored in the array that were selected

Any help would be much appreciated as my brain really hurt from this