<xf:set var="$names" value="{{ ['Patrick', 'Theresa', 'Kimball', 'Wayne', 'Grace'] }}" />
<xf:foreach loop="$names" key="$key" value="$name" i="$i">
<p>Hello there, {$name}. This is name number {$i}. Array key of this element: {$key}</p>
</xf:foreach>