Cache array length outside for statement

Apologies for the messy PR. This minification-in-repo is killing me.