A couple of issues. First Random.Range() with int in C# excludes the top value. You guys want Random.Range(0,3) there. Second, C# doesn't like you using enums as array indexes, though you might be able to cast them to int, it's ugly. If you're going to use them however, go all in, and use them as the data type for all classes, and add an extra enum to keep track of how many you have:
enum PlayerClass
{
ROGUE, // 0
FIGHTER, // 1
MAGE, // 2
NUM_CLASS // 3
}
"PlayerClass" is now a light-weight data type you can use to refer to classes. Next up, that switch statement doesn't do anything. Just use the variable you're passing in as the index rather than checking if class = PlayerClass.Rogue then using the value "PlayerClass.Rogue". Why? You already know that "class" is that value so you don't need to explictly list them out, and it's less that can go wrong.
However the main problem with the enum approach here is that there's a parallel array that needs to match the number of enums. That kind of thing is an error magnet.
The best thing to do is to forget the enum completely, and encode all the details of the classes into that one array, then when you want to generate a class you just ask the array its size value and pick a row randomly. Rather than a "stats" type just make it a CharacterClass class.
public const CharacterClass[] Classes = {
new CharacterClass("Rogue", 3,3,5,2,3,3),
new CharacterClass("Fighter", 5,3,2,2,3,3),
new CharacterClass("Mage", 2,3,3,5,4,3)
}
playerClass = Random.Range(0, Classes.Length);
Player myPlayer = new Player(playerClass);
Player(int myClass) {
if(myClass >= 0 && myClass < Classes.Length) {
stats = Config.Classes[myClass];
}
}
This is the direction to go in, since it would now be literal seconds to add or remove valid character classes.