function accessors( x, idx, predicate ) {
	var buf;
	var get;
	var i;
	var j;
	var k;

	buf = x.data;
	get = x.accessors[ 0 ];

	k = 0;
	for ( i = 0; i < idx.length; i++ ) {
		j = idx[ i ];
		if ( predicate( get( buf, j ), j, buf ) ) {
			idx[ k ] = j;
			k += 1;
		}
	}
	idx.length = k;
	return idx;
}
Returns an array of indices corresponding to the elements of an input array which pass a test implemented by a predicate function.

@private
@param {Collection} x - input array
@param {Array<number>} idx - list of indices
@param {Function} predicate - predicate function
@returns {Array<number>} updated list of indices

@example
var arraylike2object = require( '@stdlib/array/base/arraylike2object' );
var toAccessorArray = require( '@stdlib/array/base/to-accessor-array' );
var zeroTo = require( '@stdlib/array/base/zero-to' );

function predicate( v ) {
    return ( v > 0 );
}

var x = arraylike2object( toAccessorArray( [ -1, 2, 3, -4, 5 ] ) );
var idx = zeroTo( 5 );

var out = accessors( x, idx, predicate );
// returns [ 1, 2, 4 ]