Assign a whole array new

In my code ther is a array:

byte onStates[5] = {1,2,3,4,5};

This array represents a configuaration, i want to change this configuration to numerous other ones depending on a user choice.
What's the fastest way to do this? The following code didn't work but represents what i want to do:

byte onStates[5] = {1,2,3,4,5};

onStates = {1,3,3,2,5};

or

byte onStates[5] = {1,2,3,4,5};
byte onStatesAlternative[5] = {1,5,3,6,5};

onStates = onStatesAlternative;

My first idea was to write all configs in variables and simply move the pointer to the active one. But the last time i used C is long ago so i have no clue how to do it.

memcpy

The following code didn't work but represents what i want to do:

If you want to set the contents of one array to the contents of another array, and both arrays are the same size and type, memcpy() would be useful.

If you have two arrays, configOne and configTwo, you can have a pointer:

byte configOne[] = {1,2,3,4,5};
byte configTwo[] = {6,7,8,9,10};

byte *configPtr = configOne; // Use configuration 1
.
.
.
byte one = configPtr[2]; // one will be 3
.
.
.
configPtr = configTwo; // Change to configuration 2
.
.
.
one = configPtr[2]; // one will be 8
My first idea was to write all configs in variables and simply move the pointer to the active one. But the last time i used C is long ago so i have no clue how to do it.

If you're going to do that, why not use a 2D array and keep a variable with the currently selected row in it?

memcpy is someting i tried but:

byte onStates[5];
byte onStatesAlternative[5] = {1,5,3,6,5};
memcpy (onStates,onStatesAlternative,5);

produces:

error: expected constructor, destructor, or type conversion before '(' token

If you're going to do that, why not use a 2D array and keep a variable with the currently selected row in it?

It's a good idea, but i was not aware you can use 2d arrays in c.

memcpy is someting i tried but:

You tried memcpy where? Code snippets don't cut it.

Did you remember to include string.h?

but i was not aware you can use 2d arrays in c.

As many dimensions as you like (memory permitting)

#include <string.h>
byte onStates[5];
byte onStatesAlternative[5] = {1,5,3,6,5};
memcpy (onStates,onStatesAlternative,5);

void setup(){}
void loop(){}

that’s my whole code

You can’t have executable code outside of a function.

that's my whole code

And, you're aware that all executable code needs to be in a function, right?

Well, you are now.

Yes, no i'm aware. And i remember it in a very cloudy manner. I'm getting old.....

Edit:
Thanks for all your help, it now works fine.
Now i use a static 2D array for my configurations and copy the active one in a new one.