I wonder how the bag of buried weapons will come into play
I'm going with... Carol and Tyreese will sneak in, find out from Rick and the group where the weapons are and use them to bust them out. Only 6 Months to wait
So they'll bust in, then bust out.
Then bust back in, then bust everyone out.

just guessing..
Seeing as the fence line is right by the Rail Car.. It is possible Carol & Tyreese were already close when they heard all the gun fire.. They come in behind and see all the guys lined up at the fence and hear Rick yelling abut Carl..
They now hide out until things settle down, Carol sneaks in through the fence, talks to the group through the car, Rick tells them where they hid the weapons, they take out the lookout people outside the fence, sneak back in and rescue the group..
we have 6 months to guess what happens next.