micro-optimizations to Array