Actually, total internal reflection is impossible in spherical raindrops; an internal reflection occurs, but it is not total. And the rainbow is not just an arc, it is a full disk. The disks are sized differently for each color, and are brightest at the very edge, which is what makes the colored arcs appear.
For the primary rainbow, these disks are centered at the anti-solar point, which is the point you'd see looking directly away from the sun. The violet disk is 40 degrees wide, and the red disk is 42 degrees, so the red arc appears outside of the violet. For the secondary, the disks are centered on the sun - away from the direction you are looking when you see it. The violet disk is 127 degrees wide, and the red disc is 130 degrees wide. Because they are bigger than 90 degrees, these disks wrap around the sky so that you see the secondary's colored arcs in the same direction you see the primary's arcs. Technically, the red arc is still outside of the violet arc, but you see them reversed because of this wrapping.