Determining what resources to apply to a node (by means of determining which classes to apply to it), is a process called "classification" in the jargon. Hiera can and sometimes does support classification, but it does not itself perform classification, and it certainly does not itself apply any changes to nodes.
Overall, your question is incredibly broad. It's analogous to asking "How do I use SQLite to print a football player data sheet?" There are numerous ways in which you could obtain the results you're after, many of them involving Hiera in one way or another. The Hiera side would typically involve establishing a per-node
level of your Hiera hierarchy, and putting the appropriate data into a data source in that level that matches your target node. But what "the appropriate data" are depends on the Puppet manifest set you're using, perhaps including code that hasn't yet been written, and possibly on other data.
In the football analogy, these are the questions of database schema, desired datasheet details, and implementation of the program that extracts, formats, and prints the statistics. Someone else may present an example of a Puppet analog of those things, but I will not spend time on that at this point because I have no way to predict how or whether any particular example would integrate into your existing manifest set.
John