Possible to have a master automation/device table?

Apologies if I’m not explaining this right…

Basically, I would love to have a table that HA references when an incoming trigger arrives that tells HA what to do for each device on my system. Maybe HA already does this and I’m not speaking the right language. The use case would be to make it easier to add “modes” and devices without rewriting and potentially breaking other automations. Or being able to surgically change how one device behaves across several modes without having to edit each automation. This is helpful when, for example, I repurpose one device to something else - like moving a smart plug to another room. I already use group-helpers for this so I can give my devices generic names which makes it much easier to make changes later on if necessary. This would also majorly help when something unexpected happens - simply determine what operating mode was in effect and cross reference the device. Now that I think about it, having tables for triggers, groupings, etc would be very useful as well.

Im sure this exists and I just don’t know what it’s called since I have absolutely no coding or developing background.

Something like this: (I have WAY more devices than this and am gradually adding more which is why this would be useful)