function boolean( x, mask, values ) {
	var mdata;
	var mget;
	var iv;
	var N;
	var i;

	mdata = mask.data;
	mget = mask.accessors[ 0 ];

	N = values.length;
	iv = 0;
	for ( i = 0; i < x.length; i++ ) {
		if ( mget( mdata, i ) ) {
			x[ i ] = values[ iv ];
			iv = ( i+1 ) % N;
		}
	}
	return x;
}
Replaces elements in a boolean array with provided values.

@private
@param {Uint8Array} x - input array
@param {Object} mask - mask array object
@param {Uint8Array} values - values to set
@returns {Uint8Array} input array

@example
var arraylike2object = require( '@stdlib/array/base/arraylike2object' );
var Uint8Array = require( '@stdlib/array/uint8' );

var x = new Uint8Array( [ 0, 1, 1, 0 ] );

var mask = [ 1, 0, 0, 1 ];
var values = new Uint8Array( [ 1, 1 ] );

var out = boolean( x, arraylike2object( mask ), values );
// returns <Uint8Array>[ 1, 1, 1, 1 ]