function indexed( N, condition, x, y, out, stride, offset ) {
	var sx;
	var sy;
	var sc;
	var ix;
	var iy;
	var ic;
	var io;
	var i;

	// Broadcast the arrays by computing strides:
	sc = resolveStride( condition.length, N );
	sx = resolveStride( x.length, N );
	sy = resolveStride( y.length, N );

	// Initialize indices:
	ic = 0;
	ix = 0;
	iy = 0;
	io = offset;

	// Extract each desired element from a provided array...
	for ( i = 0; i < N; i++ ) {
		out[ io ] = ( condition[ ic ] ) ? x[ ix ] : y[ iy ];
		ic += sc;
		ix += sx;
		iy += sy;
		io += stride;
	}
	return out;
}
Takes elements from either one indexed array or another depending on a condition and assigns the values to elements in an indexed output array.

@private
@param {NonNegativeInteger} N - number of indexed elements
@param {Collection} condition - indicator array
@param {Collection} x - first input array
@param {Collection} y - second input array
@param {Collection} out - output array
@param {integer} stride - output array stride
@param {NonNegativeInteger} offset - output array offset
@throws {Error} input arrays must be broadcast compatible with the output array
@returns {Collection} output array

@example
var x = [ 1, 2, 3, 4 ];
var y = [ 5, 6, 7, 8 ];

var out = [ 0, 0, 0, 0 ];
var condition = [ true, false, true, false ];

var arr = indexed( out.length, condition, x, y, out, 1, 0 );
// returns [ 1, 6, 3, 8 ]

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