So I guess instead of asking "How" to do it with S (I'll figure that out) let me just ask, is it possible to take a family of objects, and every time I create an instance of one of the objects in that family either in the layout editor or at runtime, the appropriate data storage structure is created with S? (Note that just replacing families with S for everything is not ideal since I already have a ton of events that use family functionality that I'd rather not replace. However, putting all the objects in said family also in an S structure and doing it would be just fine).
Well, without going too deep: You can.
If you created your template of the data structure and a super that stores arrays of them, it is very easy:
+ some trigger
-> create object 'someobject'
-> super, add array from template 'somestructure'
-> super, lastarray, id = someobject.oid
(or just store the object itself, which is more comfortable, as you can then pick it later from within s, without any trigger or condition needed)
+ some trigger
-> destroy object 'someobject'
-> super, loop through arrays, until id = someobject.oid
-> super, delete array
You may also want to have a look at Python. It is also very easy to realize it. You'd create your data structure as a class or a dictionary on startup and just store copies of it in a list or other container, together with the object reference, whenever it is created.