code: public static void iterate(INDArray arr, CoordinateFunction coordinateFunction) {
          Shape.iterate(0, arr.rank(), arr.shape(), new long[arr.rank()], coordinateFunction);
      }
docs: Iterate over 2
  coordinate spaces given 2 arrays
  @param arr the first array
  @param coordinateFunction the coordinate function to use