How can I restore a file from the trash back to its original folder? If I deleted files on my computer and they went to the trash, how can I send them back to the same folder that they came from?

On Windows, I can right-click the files and press restore.

Copying them to a location manually (e.g. via finder) is not a valid solution, since I don't know where they came from.
I think you can just right-click the file and select "Put Back"