Added lots of array code

99% sure none of this works like I want it to