Multiply swithes, random actions

In my project I have 10 switches, connected to a arduino Nano.
I have 10 relays, and a button.

When the button is pressed a random relay activates for 800ms and then deactivates.

All this is set up and running (With no functions for the switches).

I am stuck in to make the switches do what I want and now I am completly lost.

I am trying to make:
If eg. switch no.4 is off, it will randomly activate a relay between 1-10 exept no.4 when the button is pressed.

If switch no.4,7 and 9 is off, it will randomly activate relay 1,2,3,5,6,8 or 10.

Etc. Etc.

I have read all the pages Google finds and watched a ton of youtube toutorials but can’t find a way to get it work.
I have also some problem with all the english terms.

Can sombody please point me in a direction where I can start to search for information, or what to search for, I will be greatful.

What is your knowledge of arrays? Of doing several things at the same time?