zsh array from variable does not work
I suppose if you wanted to do this in zsh, you would do the following.

~ arr=(foo bar)
~ echo $arr[1]
foo
~ val='foo bar'
~ eval "arr=($val)"
~ echo $arr[1]
foo


When you entered arr=($val), zsh interpreted this to mean arr=("foo bar") even though you did not explicitly put a pair of " around $val. When I entered eval "arr=($val)", zsh interpreted this to mean arr=(foo bar). Using eval can be confusing. When in doubt, you can use the following experiment.

Say you want to know what eval sees and therefore what really will be executed. Start with the statement shown below. Here, I assume you have already entered val='foo bar'.

eval "arr=($val)"


Now replace eval with echo as shown below.

echo "arr=($val)"


Entering the above command produces the following result.

arr=(foo bar)


This what zsh will actually be executing.