Not a stupid question at all. A dive through the patent record reveals a ton of amazing ideas for locking random objects up. in my conversations with Bob Swartz he has been fond of saying that locks are essentially latches, which is a great way to think of them. Here is a quick rundown of locks that have been patented that cover your examples: