Hope this helps :
Solution 1
$ foo=('foo bar' 'foo baz' 'bar baz')
$ foo=( "${foo[@]/%/)|(}" ) #appending ')|('
$ i="${#foo[@]}" #Taking array count.
$ i=$(( i - 1 )) #i points to the final array element
$ foo[$i]="${foo[$i]%)|(}" # Removing ')|(' attached to the final element
$ final="${foo[*]}" # storing array as string with space separated values
$ final="${final//\( /(}" #stripping the whitespace after '('
$ $ echo "$final" # and that is your result.
foo bar)|(foo baz)|(bar baz
Solution 2
Okay, this would be an easier solution, i guess
$ foo=('foo bar' 'foo baz' 'bar baz')
$ final="$(printf "%s)|(" "${foo[@]}")"
$ final="${final%)|(}"
$ echo "$final"
foo bar)|(foo baz)|(bar baz
Note
printf "%s)|(" "${foo[@]}" need an explanation I guess, So here it is
"${foo[@]}" expands to each value in the array as separate word.
printf "%s)|(" is applied to each of those words above where )|( acts as a delimiter