function deepForEach (array, callback) {
  if (isMatrix(array)) {
    array.forEach(x => callback(x), false, true)
  } else {
    arrayDeepForEach(array, callback, true)
  }
}
Recursively loop over all elements in a given multi dimensional array
and invoke the callback on each of the elements.
@param {Array | Matrix} array
@param {Function} callback     The callback method is invoked with one
                               parameter: the current element in the array