function indexed( x, indices, values, stride, getIndex, maxIndex ) {
	var iv;
	var i;
	var j;

	iv = 0;
	for ( i = 0; i < indices.length; i++ ) {
		j = getIndex( indices[ i ], maxIndex );
		x[ j ] = values[ iv ];
		iv += stride;
	}
	return x;
}
Replaces elements in an indexed array with provided values.

@private
@param {Collection} x - input array
@param {IntegerArray} indices - list of indices
@param {Collection} values - values to set
@param {NonNegativeInteger} stride - index stride for accessing elements in `values`
@param {Function} getIndex - function for resolving an array index
@param {NonNegativeInteger} maxIndex - maximum array index (inclusive)
@returns {Collection} input array

@example
var ind = require( '@stdlib/ndarray/base/ind' ).factory;

var x = [ 1, 2, 3, 4 ];

var indices = [ 3, 1, 2, 0 ];
var values = [ 5, 6, 7, 8 ];

var getIndex = ind( 'throw' );

var out = indexed( x, indices, values, 1, getIndex, x.length-1 );
// returns [ 8, 6, 7, 5 ]