Support for modular custom variables/dimensions

Im trying to use custom variable in a scope that would allow for modular programming. More specifically, I would like to use custom variables or dimension to record user events such as sharing a entity or exporting a entity and use that data in a discussion internally to see if these functionalities are used and if so to what extent. As such, metadata such as userID/entitiyID should be pushed alongside the actual categories for custom variables. Would there be a way to declare custom variable that wouldnt require
_paq.push(['setCustomVariable', 1, "X', 'Y', 'Z']);
to be called for each and every thing we are trying to store and make it more modular so that a single function like
window._paq.push(['trackEvent', name, action, event]);
could be called where name, action, and event are state based parameters that could change based on where the user is on the website?