Fix cache creation for arrays

Model caches were incorrectly sharing the same object references
with instance values.