Switch-interpreter: Reduce copy-pasted code in array handling.
am: 1332c26c69

Change-Id: I77797194b727c7b1b76380b767e8f2623270a195