Convert object arrays to template arrays