How to remotely change slides out of order when displayed on an iPad? For a psychology experiment a friend of mine is looking for a possibility to show phrases on an iPad screen which can be controlled from outside. (Laptop, second iPad)

There will be around 100 Phrases (probably on slides). And the it should be possible to make the iPad jump to any slide but without interacting with it.

Any ideas how this could be achieved?
Your friend could set up a Keynote presentation on the iPad.
The Keynote presentation can then be remote controlled from the second iPad with Keynote Remote:

Keynote Remote lets you control a Keynote presentation on your Mac, iPad, iPhone, or iPod touch from another iPhone or iPod touch in the room.
While you present, view your current slide and presenter notes in portrait, or the current slide and next slide in landscape. Swipe forward to advance and swipe back to return to the previous slide.

As for randomizing, this won't be easily possible with Keynote—you can only script it with AppleScript on a Mac, but there are apps like Screens and others that would turn the iPad into a remote screen for a computer so you could do your randomizing and controlling remotely.
A custom web app or setting up a web server that cycled among random images each time you tapped the screen would be also inexpensive to code, but it's not really using presentation software and you'd need to have a remote to toggle the change if touching the screen was really not an option.