function assign( x, indices, mode, out, stride, offset ) {
	var xo;
	var io;
	var oo;

	xo = arraylike2object( x );
	io = arraylike2object( indices );
	oo = arraylike2object( out );
	if (
		xo.accessorProtocol ||
		io.accessorProtocol ||
		oo.accessorProtocol
	) {
		// Note: we only explicitly support a limited set of dtype-to-dtype pairs, as this function should not be concerned with casting rules, etc. That is left to userland...
		if (
			isComplexDataType( xo.dtype ) &&
			isComplexDataType( oo.dtype )
		) {
			complex( reinterpret( x, 0 ), io, mode, reinterpret( out, 0 ), stride, offset ); // eslint-disable-line max-len
			return out;
		}
		if (
			isBooleanDataType( xo.dtype ) &&
			isBooleanDataType( oo.dtype )
		) {
			boolean( reinterpretBoolean( x, 0 ), io, mode, reinterpretBoolean( out, 0 ), stride, offset ); // eslint-disable-line max-len
			return out;
		}
		accessors( xo, io, mode, oo, stride, offset );
		return out;
	}
	indexed( x, indices, mode, out, stride, offset );
	return out;
}
Takes elements from an array and assigns the values to elements in a provided output array.

@param {Collection} x - input array
@param {IntegerArray} indices - list of indices
@param {string} mode - index mode
@param {Collection} out - output array
@param {integer} stride - output array stride
@param {NonNegativeInteger} offset - output array offset
@returns {Collection} output array

@example
var x = [ 1, 2, 3, 4 ];
var indices = [ 3, 1, 2, 0 ];

var out = [ 0, 0, 0, 0 ];
var arr = assign( x, indices, 'throw', out, 1, 0 );
// returns [ 4, 2, 3, 1 ]

var bool = ( arr === out );
// returns true