Make better use of a variable

arrayLength variable wasn't being used very well, so I renamed it to
arrayBound and made a tiny improvement.  No increased functionality and no modified tests.