Fix creation and use of ArrayTypes
Some tests are invalid or wrong. Also move stack overflow ones