I have something like this, an array of arrays where each array has a 7 values
const arrays = [[1,2,3,4,5,6,7],[8,9,10,11,12,13,14]]
What's the most efficient way to split this into array of arrays where each array will have a 2 values and last array of arrays will hold the remaining 1 element, like this
[[1,2], [8,9]] [[3,4], [10,11]] [[5,6], [12,13]] [[7], [14]]