Optimized array.js