AngularJS module for advanced working with arrays in JS