It is possible, but not in a way you won't regret later. If you really must know, ruby has an instance_variables method that will give you the list, and an instance_variable_get method that lets you access them without using literals. That said, templates have some instance variables that Chef Client sets behind the scenes for bookkeeping, and the names and existence or non-existence of those can change at any time. Plus, what you're suggesting would break if you ever added a different variable that wasn't conceptually part of the list.
Per the previous reply, the best thing to do is pass your variable in as a collection of some sort and then iterate over that.