How to use array with a @export var?

Godot Version

4.7

Question

How to use an @export var to make 1 element of my array become true?
The idea of this is tho make an @export var wher i select a value like 1 or 2 or 209
and make this part of the array become true like if i slect 0 level1 in my array gets true
I basicle want to make a level component wich unlocks the selected value in my array.
Thank you for reading : )

Why do you need an export var? Why not just use array[index].bool = true or something when the condition is met?

Export vars are useful for making work in the editor easier but not really for things like this.

because adding a new level to my game is super hard right now i have to make 1 script for all my levels wich on winning makes 1 level_unloced var (inside my global)become true.
my solution to this is to create an level unlock component with an export var wher i can select the level wich gets unlocked on my winn conditon.
so this is why i want to make it an export var

something like this?

@export var array_index_to_be_true: int

var your_array: Array[bool]

func _ready:
	your_array.resize(10) #or whatever the array size is.. (or fill the array at declaring.. or assign it somewhere else)
	your_array[array_index_to_be_true] = true

wow thank you man : )