Complex transition to chaotic flow in a periodic array of cylinders