Firstly, notice that you are doing the same exact process in several places, which is begging for putting that code into a function in just one place (part of the don't repeat yourself [DRY] principle). Then, following the preg_replace_callback() manual/example, I'd define the function as:
function fixCase($string)
{
return preg_replace_callback(
'/_(.?)/',
function($matches)
{
return(strtoupper($matches[1]);
},
$string
);
}
If you stick that function definition into your script (or an include file included by the script), then all you have to do where you want to apply that change is just call the function:
if (is_array($imp_value)) {
$methods[$imp_key][] = fixCase($addon_id);
}