I think something like that would have to be custom coded... a data layer is just one way of passing information between the site and the analytics... it's not even the only way....
Data can come from different sources (data layers, cookies, session variables, custom event details, in-line attribu...