I think opening something in the hex editor, changing necessary bytes and saving it is as general purpose as it gets. You usually don't distribute it (I remember they days when it was common however) due to law, so in practice people write code that hot-patches stuff after starting the process.
You can also just open gdb and patch the process on the fly when you need to do things.
At the end of the day there isn't much hard difference between source code and binary code. By design source code is usually easier to read and write, but it's all syntax sugar and transformations all the way down.