When you do a loop like that for elements of a list, it's usually done with a bits template.
So, my suggestion would be to have a template like so...
HTML Code:
<li>$artist</li>
Then in the loop...
PHP Code:
$artistbits = '';
$artists = array('Metallica', 'Evanescence', 'Linkin Park', 'Guns n Roses');
// loop over it and print array elements
for ($x = 0; $x < sizeof($artists); $x++)
{
$artist = $artists[$x];
eval('$artistbits .= "' . fetch_template('artist_bit') . '";');
}
Then later when you call the main tempate...
HTML Code:
<ul>
$artistbits
</ul>
The problem you are having seems to be trying to display an object in the templates. But I'm not 100% sure. That's a guess.