XF 1.3 PHP in template file?

Hi, I am just migrating from Vbulletin and I am wondering how to acheive some functionality I havd there via a plugin.

I have an array of sponsors banner images and I randomly select 2 of these each time the page is reviewed.

I had hoped to simply place the PHP in the logo blog template but that doesnt work. Do I need to develop a add on?

thanks in advance.
Loving Xenforo so far!