You can send color/cursor escapes to a terminal by simply writing to
/dev/ttyN; for instance, if
/dev/pts/5 is an xterm, you can set its background to red from anywhere with
printf %b '\e]11;#ff0000\a' > /dev/pts/5 (of course, you need write permissions to
There is a slim chance that running such a command may badly interract with other escapes sent by the program(s) running in the terminal, but in the worst case this will only result in a scrambled terminal.
For the more general problem of running a program in another terminal/session, the only way I can think that possible is by hijacking a process running in that terminal, and fork+exec the program from inside it. Example:
gdb -p PID -batch -ex 'p system("ls")'
This gets a lot more involved if the program has to read from the terminal; before the exec, the process will have to be added to the foreground process group. And of course, the hijacked process may not like having unexpected children ;-)