What you have is an array of multiline strings. For the desired output you need an array of objects:
$a = @(
[PSCustomObject]@{
'a' = 'all'
'b' = 'call'
},
[PSCustomObject]@{
'a' = 'all'
'b' = 'll'
}
)
If your input data is actually a list of multiline strings with lines of the form key=value you can transform those into custom objects like this:
$a = @(
'a=all
b=call',
'a=all
b=ll'
)
$a | ForEach-Object {
[PSCustomObject]($_ | ConvertFrom-StringData)
}
ConvertFrom-StringData converts a string with one or more lines of key=value pairs into a hashtable, which can then be cast into a custom object.