If you have the instance id, you can do:
to find each layer-purpose-pair, and then find the shapes on each layer. Having done that, you could use things like dbTransformPoint or dbTransformBBox to transform the coordinates to the top level coordinate system, passing instId~>transform as the transform argument.
Essentially instId~>master is pointing at the subMaster of the pcell - i.e. the particular variant.
To select something a fixed point use:
geAddSelectPoint(hiGetCurrentWindow() nil point)