Separates Elements into diferent arrays by type

Removes unnecessary NULLs and zeros from memory due to C++ problems with union.
Code is simpler when looping over elements