What year is your TM?
If the new lights work as they should, then your job is done, even if I don't quite understand what is going on. If you still need help, start with this post
https://www.trailmanorowners.com/for...d.php?p=153130
Dick has included two wiring diagrams at the bottom of the post - the second one is the one that may be useful to you. In the lower right-hand corner of that diagram, you see the running lights, backup lights, and turn-and-brake lights (both functions on one bulb with one wire). The color of the wires in the TM is also called out. As you noted, each side actually has 3 colors coming to it from the TM. One side appears to have 5 wires because the same color wire comes out of the TM wall and goes back in again, headed for the other side.
Left fixture:
Red from TM is the left turn and brake signal
Yellow is the left backup light
Green is the running lights
Right fixture:
Brown (it may look black) is the right turn and brake
Yellow is the right backup light
Green is the running lights
White is the common ground for all of it, and inside the wall it is attached to the trailer's aluminum skin. This means that you can make the needed ground connection in the fixture either by using the white wire, or by connecting the ground in the fixture directly to the aluminum skin. My difficulty is that I don't see where either of these connections is made.
Bill