When X is running Vim is just pulling from xclip. This means copy-paste between applications that most people are thinking of really is an X feature.
While many applications have copy-paste functions or buffers to really be a clipboard it needs to be a shared function between applications through some form of IPC.
Both the big toolkits actually support this in a way over dbus. Even if in the background they are using X anyway the point is that these are interfaces that other applications can use.
Both interfaces abstract the underlying Windowing systems clipboard so this would include working with Wayland which is more generic concept of "data sharing"
On the console technically copy and paste is the same thing as saving and loading any buffer so just redirect what you need. So this is copy and paste at the OS level:
mkfifo clipboard && (echo -e "$copy" > clipboard && rm clipboard) &
At the bash/command interpreter level copy and paste is just:
Also I realize the first also uses variables. But its using features of the OS as a demonstration.