Fix picking the wrong variable for indexable temp.

Also updated tempArray test to include integer temp array.