Kill off some usages of the ArraySize macro.

This required the use of std::array in some cases, it allow allowed for conversion of some for loops into foreach loops which is always nice.