All variants of an enum use the same amount of memory (in case of your Foo type, 16 bytes, at least on my machine). The size of the enum's values is determined by its largest variant (One, in your example).
Therefore, the values can be stored in the array directly.