It depends. Does each node need a specific value? Do you need to avoid repetition or ensure that all possible values are used? What particular approaches are you disfavoring as "static"? Does it need to be scalable? Does the value assigned to each node need to remain constant?
If you have exactly 30 values that you must assign to 30 nodes, with a different value for each node, then you probably have no choice but an approach relying on a static mapping from nodes to values. That mapping could be expressed via a separate node block per host, or in a hash in some class, or as a custom function, or in one of at least two different ways in hiera. Or it could be managed via an ENC, or in some cases it could be directly derived from hostnames alone.
On the other hand, if the values don't need to be distributed uniformly to nodes, but do need to be stable on each node over time, then you should look into using Puppet's standard
fqdn_rand() function.
John