bash display stdout on console and store it in an array

std_out=()
exec 3>&1
std_out+=($(printf "foo\n" |tee >(cat - >&3)))
std_out+=($(printf "bar\n" |tee >(cat - >&3)))
std_out+=($(printf "baz\n" |tee >(cat - >&3)))
exec 3>&-
echo "$std_out"
unset std_out

In action.

~ % std_out=()
~ % exec 3>&1
~ % std_out+=($(printf "foo\n" |tee >(cat - >&3)))
foo
~ % std_out+=($(printf "bar\n" |tee >(cat - >&3)))
bar
~ % std_out+=($(printf "baz\n" |tee >(cat - >&3)))
baz
~ % exec 3>&-
~ % echo "$std_out"
foo bar baz
~ % unset std_out

Usefull link about I/O redirection: http://tldp.org/LDP/abs/html/io-redirection.html