Well, for interaction, you could do something like this:
As for creating the random pattern, that could be as simple as the server generating a random number, storing it, and then sending it to the client which then uses the number to create a UMG UI display. If the client sends the right information back, then you can proceed.
However, if you are trying to do this pattern system as a means of bot-prevention… that’s a LOT more involved. The key issue here is that any information the server sends can be intercepted, and any algorithm you come up with to create the pattern can be decoded. That’s why Captcha works – the information sent to the client is just an image URL which the computer can’t decipher into the glyphs represented in the image (but a human can). If this is your objective, you’d probably want to either (a) implement your own Captcha client; or (b) implement your own image creation/modification system using something like ImageMagick on a Linux LAMP server.