wp_enqueue_script states the parameters type respectively as
string - string - array - string - boolean
. As you pass an array as the second parameter, the error occurs.
Now, comparing your $array data, you can handle it extracting the array or using array key/value. –
public function loadScripts()
{
$themeScripts = iarray(
'custom' => array(
'src' => '/includes/js/custom.js',
'deps' => 'jquery',
'ver' => '4.0',
'in_footer' => true
),
'selecter' => array(
'src' => '/includes/js/jquery.fs.selecter.min.js'
'deps' => 'jquery'
'ver' => false,
'in_footer' => true
)
);
foreach( $themeScripts as $handle => $args ):
extract($args);
wp_enqueue_script(
$handle,
$src,
array($deps),
$ver,
$in_footer
);
endforeach;
}