Puppet function to match vars against a pattern and create an array from their values (and optionally regexp captures)