After my comment, I post this reply which explains what I meant with "instead of echo..."
The original line of code is:
dirs[0]=`export DIR_1=./dir1 && echo $DIR_1`
Here, the export does not work because it is executed under another instance of the shell, as you used the back ticks. In the child shell the export is executed, but the modified environment can not be "ported back".
Instead, to obtain the same, but working, result, you can write:
export DIR_1=./dir1; dirs[0]=$(echo $DIR_1)
The above line is equivalent to your original one, it makes exactly the same thing, included the strange way to assign to dir[0], but the export is executed in the local shell and exported to all the future childs. What I meant was you can write any command after the "export DIR_1...", even dirs[0]=...
DIR_1=./dir1;dirs[0]=$DIR_1;echo $DIR_1saves you a whole subshell. What motivates the&&- assigning a constant to a variable will never fail surely.