adds all arrays to make a final array