How to put an array in wp user query

This sounds like a job for the wp_parse_id_list() function. It will return an array of unique IDs, sanitized with the absint() function:

$csv = bp_get_following_ids();

if( 0 !== $csv ) )
{
    $uids       = wp_parse_id_list( $csv );
    $user_query = new WP_User_Query( [ 'include' => $uids ] );
}

where we assume that bp_get_following_ids() returns a comma-seperated string of user IDs on success or integer zero on failure.

Example

If we take a comma seperated string, with some “dirty” values:

$csv = "1a,2!,3";

and

$uids  = wp_parse_id_list( $csv );

then

var_dump ( $uids )

array (size=3)
  0 => int 1
  1 => int 2
  2 => int 3

and

print_r( $uids):

Array
(
    [0] => 1
    [1] => 2
    [2] => 3
)