added missing functions to arrays.js