You could try SobGroup_HasSubsystem . The function appears in the globals dump but I can’t find it in any of the games code. My guess to how it works is SobGroup_HasSubsystem( <<>sSobGroupName>, <<>sSubSystemNameOrType> )
Look at SobGroup_CreateSubSystem for what each argument is. Again, this is only a guess and I haven’t tried it.
For determining what subsystem is on which hardpoint… I don’t think that is possible. At least not without constantly keeping track of what subsystem has been built/destroyed and knowing which hardpoints they can be built on.
I know you can use use subsystem name ( eg Hgn_Ms_Sensor_AdvancedArray ) but unsure if you can use the subsystem type ( eg AdvancedArray ) . Other then that, it works like above (<<>sSobGroup>, <<>sSubSystem>)