Fixed the Array creation. Before the Arrays were created as Object Array...

...s and I had problems when casting them later on. Now the Arrays are created as Arrays of Entities.