Use Arrays in combination with complex types

I made sure, that the arrays also work with complex types and added unit tests for that szenario. Also I added some unit tests for other parts to improve code coverage.