That's a difficult spot. Let's see what the possible solutions are.
καὶ εὗρεν ἐν τῷ ἱερῷ τοὺς πωλοῦντας βόας καὶ πρόβατα καὶ περιστερὰς καὶ τοὺς κερματιστὰς καθημένους, 15 καὶ ποιήσας φραγέλλιον ἐκ σχοινίων πάντας ἐξέβαλεν ἐκ τοῦ ἱεροῦ, τά τε πρόβατα καὶ τοὺς βόας, καὶ τῶν κολλυβιστῶν ἐξέχεεν τὸ κέρμα καὶ τὰς τραπέζας ἀνέτρεψε, 16 καὶ τοῖς τὰς περιστερὰς πωλοῦσιν εἶπεν·[...]
I'm thinking of my mentor right now, he is such a genius in such cases, he'd definitely know the answer :)
Option 1, the author is saying: [...]he drove all out of the temple, namely both sheep and cattle.
(I translate "both", because of the "τε", which could well be a powerful hint in this sentence)
In this case, sheep and cattle is used as an explanation(epexegesis, which is like apposition, but not entirely the same, namely in apposition we move from specific to general [Ramses, the Pharaoh of Egypt, received a blessing], whereas in epexegesis we move from general to specific [They blessed the Pharaoh of Egypt, Ramses]) for "all". This however is impossible, since the author would have used "πάντα" (neuter) instead of "πάντας". That's why I think we can safely say "πάντας" does NOT include sheep and cattle.
Option 2, that would be assuming a "πωλούντας" after "sheep and cattle", and that would lead us to: [...]he drove everybody out of the temple, both those selling sheep as well as those selling cattle. But that doesn't make 100% sense since those selling sheep and those selling cattle still aren't "everybody", there's those selling doves and some others.
So what do I suggest? Option 3: "sheep and cattle" are an epexegesis to "all" (like in option 1), but in an additive sense. "He drove everybody out, and both sheep and cattle too. I've never encountered such a syntactical phenomenon, or never cared about it enough to notice, but I don't see why it shouldn't work. I'm not entirely sure however.
Option 2 is very convenient, but there's no need to assume anything when things are clear enough without any assumptions whatsoever. So I would go for it only if somebody can prove that such a thing as an epexegesis in an additive sense like I suggested doesn't or can't exist.
But I think it should exist, since there's cases where it's useful.
"He was in court. Against him, the president, the minister of education and the judges... And he cursed at everybody; not only the president but the minister as well!". In that case, "the president and the minister" is epexegesis to "everybody"... However that doesn't necessarily mean that "everybody" doesn't include "the judges". We just chose to mention "the president and the minister" because we felt that was the most important or whatever part. Like if driving the humans away was something natural, but driving all the animals away was something that unbelievable that he had to repeat it.
Again, I'm not a philologist but that's the way I feel about this peculiar as much as interesting case.
PS: I'll change my post... I thought about it again, and I'm thinking that all those accusatives might just be objects to "drove out"... I don't see why it shouldn't be. Πάντας then would refer to the humans only, and the other words would be plain objects. This "τε" is making me second guess this, but really I can't decide which option is strictly grammatically more correct.
I do NOT think that saying "the masculine word translated "all" is grammatically associated with masculine "cattle" and "sheep," though not in that order", is correct.