puppet and array loop

Any particular reason you need to use that data structure? That will get unreadable very quickly, and would be very easy to break things by accidentally adding or removing an element from one of the arrays and not the others. How about something like this instead?

$servers = [
  {
    name => 'felix',
    ip   => '192.168.43.5',
    env  => 'prod',
  },
  {
    name => 'washington',
    ip   => '192.168.43.11',
    env  => 'uat',
  },
]

Then it's much simpler to work with in the erb:

<% servers.each do |server| -%>
  <%= server['name'] %> <%= server['ip'] %> <%= server['env'] %>
<% end -%>

But, if you're stuck with your current data structure, then this should do it..

<% (1..servername.length).each do |i| -%>