Refactor the array API into lang.Util