Join two arrays into a single one
Change $devicesArray to $devices.  It is obvious enough that each device would contain an array of information.
Change $namesArray to $deviceFields it is more meaningful.
Change $deviceName to $deviceType. $deviceName seems to be misleading.
Use $device instead of $d in the foreach loop, it is more meaningful.
'Device' is a field and should be the first field in $deviceFields. This is required for the following improvement.
Use array functions to combine the arrays:
array('Device Type' =&gt; $deviceType]) + array_combine($deviceFields, $device).


The function then becomes:

function convert($deviceType, $deviceFields, $devices) {
    $result = [];

    foreach ($devices as $device) {
        $result[] =
            ['Device Type' =&gt; $deviceType] +
            array_combine($deviceFields, $device);
    }

    return $result;
}