local is the same as typeset and it is a declaration. Set is an assignment to the array. To use associative arrays, typeset (declaration) must be done beforehand.. With regular arrays declaration is optional.
% set -A arr red 1 blue 2
% echo ${arr[red]}
% typeset -A arr
% set -A arr red 1 blue 2
% echo ${arr[red]}
1
% echo ${arr[blue]}
2