From man zsh:
for variables with shared values it is therefore recommended to set the flag
for all interfaces, e.g. `typeset -U PATH path'.
Otherwise one of them is not unique:
% echo ${parameters[path]}
array-unique-special
% echo ${parameters[PATH]}
scalar-export-special
After:
% echo ${parameters[path]}
array-unique-special
% echo ${parameters[PATH]}
scalar-export-unique-special
Additionally drop a superflous for loop.