WHen I write a bash program I typically construct calls like follows:
declare -a mycmd=( command.ext \"arg1 with space\" arg2 thing etc )
\"${mycmd[@]}\" || ech
How about declare -p quotedarray
?
-- edit --
Acctually, declare -p quotedarray
will satisfy you purpose well. If you insist on the output format of the result, then I have a small trick would do the work, but just for the indexed array not associative one.
declare -a quotedarray=(1 2 "3 4")
temparray=( "${quotedarray[@]/#/\"}" ) #the outside double quotes are critical
echo ${temparray[@]/%/\"}