array.c optimizations and warnings