Update arrays.js

Fixed type annotation of mapIndexed