Accessing PHP variables in templates

I've had a lot of success using the callback system for Xenforo pages to return php variables. My question is that if I know the index into an array, how to I get the value out of the array. Something like :

<div id="Foo">
<b>Bar: </b> {$myArray[{$index}]}
Doesn't seem to work. Is there a way to access the element at a specific index in the array object from the xenforo templates?