Combining arrays is straightforward: $array3 = $array1 + $array2
Your question poses a very different problem. You want to aggregate the properties/values of several different data sets, arriving at a new set containing the complete set of properties and values from all of them on unique objects.
See if this fits you needs:
# get a list of all NoteProperties from all data
$Props = @()
$IntuneDevices, $SoftwareADevices, $SoftwareBDevices | # if large lists, use [0]th element of each array instead of the whole lot
ForEach-Object{
$Props += $_ |
Get-Member -MemberType NoteProperty |
Select-Object -ExpandProperty Name
}
$Props = $Props | Select-Object -Unique # only need one of each
$All=[ordered]@{} # use this to accumulate properties
$CurrentComputer = $null
$IntuneDevices + $SoftwareADevices + $SoftwareBDevices |
Sort-Object ComputerName |
ForEach-Object{
$Obj = $_
if ($null -eq $CurrentComputer){
$CurrentComputer = $_.ComputerName
}
elseif ($_.ComputerName -ne $CurrentComputer) {
[PSCustomObject]$All # emit the completed computer aggregate
$CurrentComputer = $_.ComputerName
$All.Clear() # start with empty hash
}
$Props | # look for all properties on all objects
ForEach-Object{
if (-not $All.$_){ # don't overwrite an existing value
$All.$_ = $Obj.$_
}
}
}
[PSCustomObject]$All # emit the last computer's stuff