function recurse( obj, shape, strides, offset, order, dim ) {
	var stride;
	var item;
	var out;
	var n;
	var i;

	if ( dim >= shape.length ) {
		return obj.accessors[ 0 ]( obj.data, offset );
	}
	out = [];

	n = shape[ dim ];
	stride = strides[ dim ];

	for ( i = 0; i < n; i++ ) {
		item = recurse( obj, shape, strides, offset, order, dim+1 );
		out.push( item );
		offset += stride;
	}
	return out;
}
Recursively converts an ndarray to a generic array.

@private
@param {Object} obj - array object
@param {(ArrayLikeObject|TypedArray|Buffer)} obj.data - data buffer
@param {Array<Function>} obj.accessors - element accessors
@param {NonNegativeIntegerArray} shape - array shape
@param {IntegerArray} strides - array strides
@param {NonNegativeInteger} offset - index offset
@param {string} order - specifies whether an array is row-major (C-style) or column-major (Fortran-style)
@param {NonNegativeInteger} dim - dimension
@returns {(Array|Array<Array>)} output array