I don't think there is a limit to variable size in bash, but do you really want a 6GB variable in your shell (suject to ulimit -a of course)?
There certainly is a limit on the command-line. grep $TEN_MILLION_FILENAMES is not going to work. In fact, it's very hard to do any command spawning with $TEN_MILLION_FILES. You need other strategies like doing it per-directory, or temporary files &c.