Check many array allocations for overflow

I definitely didn't get them all but I got a whole lot. Also I didn't
check the JIT code for allocating arrays so people who are more
knowledgeable than me will have to audit that.