function indexed( x, mask, values ) {
	var iv;
	var N;
	var i;

	N = values.length;
	iv = 0;
	for ( i = 0; i < x.length; i++ ) {
		if ( !mask[ i ] ) {
			x[ i ] = values[ iv ];
			iv = ( iv+1 ) % N;
		}
	}
	return x;
}
Replaces elements in an indexed array with provided values.

@private
@param {Collection} x - input array
@param {Collection} mask - mask array
@param {Collection} values - values to set
@returns {Collection} input array

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

var mask = [ 1, 0, 0, 1 ];
var values = [ 20, 30 ];

var out = indexed( x, mask, values );
// returns [ 1, 20, 30, 4 ]