Adding an Array to the Code to extend the user roles

Hi

I have the following code

// Allow administrators to create new users
add_filter('frmreg_required_role', 'frm_allow_administrator_create');
function frm_allow_administrator_create(){
  return 'administrator'; // change this to any user role
}

// Reset the default user ID in the user ID field
add_filter('frm_get_default_value', 'reset_user_id', 10, 2);
function reset_user_id($new_value, $field){
  if ( in_array( $field->id, array( 220 ) ) && current_user_can('administrator') ) { //change 25, 26 to the ID(s) of the userID field
    $new_value = '0';
  }
  return $new_value;
}

I would like to extend this function to use an array of user roles in the first part

return 'administrator'; // change this to any user role

and also in the second part

if ( in_array( $field->id, array( 220 ) ) && current_user_can('administrator') )

So the finished code would be something like

// Allow groups to create new users
add_filter('frmreg_required_role', 'frm_allow_groups_create');
function frm_allow_groups_create(){
  return 'administrator'; // add array of user roles here
}

// Reset the default user ID in the user ID field
add_filter('frm_get_default_value', 'reset_user_id', 10, 2);
function reset_user_id($new_value, $field){
  if ( in_array( $field->id, array( 220 ) ) && current_user_can('administrator') ) { //add array of user roles here
    $new_value = '0';
  }
  return $new_value;
}

Is anyone able to offer any assistance to make this work please?

Thanks

Wayne