added bounds/len support, added foreach support for arrays