function indexed( x, mask, out, stride, offset ) {
	var io;
	var i;

	io = offset;
	for ( i = 0; i < x.length; i++ ) {
		if ( mask[ i ] ) {
			out[ io ] = x[ i ];
			io += stride;
		}
	}
	return out;
}
Applies a mask to an indexed array and assigns unmasked values to elements in an indexed output array.

@private
@param {Collection} x - input array
@param {IntegerArray} mask - mask array
@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 mask = [ 0, 1, 0, 1 ];

var out = [ 0, 0, 0, 0 ];

var arr = indexed( x, mask, out, 1, 0 );
// returns [ 2, 4, 0, 0 ]