refactored array.view.js