Add missing array.dats and fixups for latest ATS compiler code

I tried building and came across an error with a missing prelude/dats/array.dats and some changes needed to work with the latest ATS compiler code. This commit fixed these issues for me.