The Bible is silent on the issue of how all the animals were gathered.
All it tells us is that they were brought to Noah.
We are told that in the future angels will be sent to gather all of the elect from all over the world.
How that is going to be done is probably the same way the animals were gathered.