code: function groupToElements(array, n) {
    var lists = _.groupBy(array, function(element, index){
      return Math.floor(index / n);
    });
  
    return _.toArray(lists);
  }
docs: Split array to smaller arrays containing n elements at max