Shuffle playback doesn’t seem to be available at the moment, or at least I haven’t found a solution yet. It’s also hard to predict whether a Keynote can handle that many photos, since 21,000 is quite a large number.
What you can do, though, is make a slideshow play and loop automatically.
One option that comes to my mind is to insert each image into a separate slide, but that would create a slideshow with 21,000 pages, which is a bit excessive.
A more practical solution seems to be using an image gallery. Apple has a guide for this.
Add an image gallery in Keynote on iPad - Apple Support
This way, you can insert an array of images in the same location. Once you enable the self-playing feature (found under More -> Settings -> Presentation Type), the images in the gallery will play automatically and loop.
