{% for v in my_array -%}{{ loop.index }} {{ v }}{%- endfor %}