Reworked array stuff