Test unit for array utils, and a lot of changes