In #zsh, « typeset -a X Y; X=(1 2 3); Y=$X » results in a scalar value in Y. You have to use «Y=($X)» to copy X as an array. Odd.