More array type guessing and fixes