it'll probably take some poking around in the sdk and plugin's source to fully understand this, but basically, there are pointers to construct objects. objects like 'sprite', or 'particles'
these pointers are CRunObject* variables;
one way it could work is by having a vector(like an array, but it can change size) or list of CRunObject*'s for the source objects
and a vector of vectors of paired CRunObject*'s for all the objects it's linked to
when the 'for each paired object' condition is called
it loops through the source object vector, comparing each item with the selected type, and then the
'pick paired' condition loops through the vector within a vector of linked objects finding all the ones it's linked to of that type
let's say it found one at
sourceobjects[5]
then it would go to the vector of paired objects at pairedobjects[5]
and if it found the object say at pairedobjects[5][3] it adds it to the picking list
if you need more specifics about the actual commands to do any of this, let me know, but that's how it works in a general way. the picking list is a list of pointers to specific objects that are currently picked in construct, and all plugins have access to read or change it