function ndarrayFcn( arrays, fcn ) {
		var opts;
		var ords;
		var args;
		var sub;
		var sh;
		var M;
		var N;
		var f;
		var i;
		var j;

		if ( arguments.length > 1 ) {
			f = fcn;
		}
		sh = arrays[ 0 ].shape;
		N = numel( sh );
		M = arrays.length;
		ords = [];
		args = [];
		for ( j = 0; j < M; j++ ) {
			ords.push( arrays[ j ].order );
			args.push( 0 );
		}
		opts = {
			'order': ''
		};
		if ( f ) {
			for ( i = 0; i < N; i++ ) {
				for ( j = 0; j < M; j++ ) {
					opts.order = ords[ j ];
					sub = ind2sub( sh, i, opts );
					args[ j ] = arrays[ j ].get.apply( arrays[ j ], sub );
				}
				ctx.sum += f.apply( null, args );
			}
		} else {
			for ( i = 0; i < N; i++ ) {
				for ( j = 0; j < M; j++ ) {
					opts.order = ords[ j ];
					sub = ind2sub( sh, i, opts );
					ctx.sum += arrays[ j ].get.apply( arrays[ j ], sub );
				}
			}
		}
	}
ndarray function.

@private
@param {Array<ndarrayLike>} arrays - ndarrays
@param {Function} [fcn] - callback