It would be nice to be able to include complex variables/arrays in a ComponentArray that still behaves as an array of Reals. This is necessary when some other components are real, or for use in solvers that only take Real arrays.
This would look something like:
julia> arr = ComponentArray(a = 0, b = ComplexView([ 1+ 2im, 3 + 4im ]);
julia> collect(arr)
[ 0, 1, 2, 3, 4 ]
julia> arr.b[1]
1 + 2im