Using parseyaml as a replacement for hiera?

I'm working on converting a module that was written for hiera into a module
that can have that yaml passed via a parameter in Foreman. I've seen some
posts that say to use parseyaml from stdlib to take care of that, but I
can't find any examples of that method. Does anyone have an example of how
you use that method against something like:

$some_thing = hiera_hash('some_yaml::some_value)'
$another_thing = $some_thing[someotherthing]

Also need to figure out a workaround for hiera_array

ex.

$more_things = hiera_array('some_yaml::bunch_o_stuff')

I'm not sure if I'm thinking about this correctly. Are there any other
methods for directly replacing hiera functionality with foreman parameters?

Thanks.