In case you mean element groups, then there are GUIDs for element groups accessible with the Archicad C/C++ API. I don't think there's a way to handle (even retrieve) those GUIDs without writing an Add-On though. (Reference from the API docs: https://archicadapi.graphisoft.com/documentation/acapi_elementgroup_getgroup) In general the C++ API seems to be much better suited to handle such groups in comparison to GDL.
In case you mean sold geometry groups in GDL, then to me it seems more like a "local" variable which can be referenced by it's unique name, which you define yourself anyway. So I guess that's not what you mean 🙂
Bernd Schwarzenbacher Self-Employed Archicad Add-On Developer AC 24-25, VS 2019