Python Loop Through Array And Arraylists