(require 'array-for-each)
If array1, ... are arrays, they must have the same number of dimensions as array0 and have a range for each index which includes the range for the corresponding index in array0. If they are scalars, that is, not arrays, vectors, or strings, then they will be converted internally to arrays of the appropriate shape. proc is applied to each tuple of elements of array1 ... and the result is stored as the corresponding element in array0. The value returned is unspecified. The order of application is unspecified.
One can implement array-indexes as
(define (array-indexes array)
(let ((ra (apply make-array #f (array-shape array))))
(array-index-map! ra (lambda x x))
ra))
Another example:
(define (apl:index-generator n)
(let ((v (make-uniform-vector n 1)))
(array-index-map! v (lambda (i) i))
v))
eqv? to scalar.
If the optional argument prototype is supplied it will be used
as the prototype for the returned array. Otherwise the returned array
will be of the same type as array if that is possible, and
a conventional array if it is not. This function is used internally
by array-map! and friends to handle scalar arguments.