The UUID is not the same as the serial number.

When you use any Mac, some machine-specific preference files are created in your Library/Preferences/ByHost/ directory. The filenames are of the form

com.apple.app.UUID.plist

So, if you really want the UUID of a previously used machine, you can probably dig it up from some backups in that way. I don't know how useful that would be though.

I think TimeMachine stores UUIDs of the filesystem, but not the computer itself. Checking the logs on one of our servers here, I see several fsUUID and eventDBUUID but nothing for the machine.