The internal drive of my iMac went bust recently, the iMac is not under warranty anymore so I do not plan to fix it anytime soon. At the moment I am using an external drive and I am managing. The only problem is that if I move the screen or remove a USB drive from a port next to the one being used by the external hard disk I risk unplugging the external drive. Is there a form of accessory I can buy to help prevent such a thing? Do you have any other setup in mind that might be more stable?
Connect a USB hub and the boot drive only to the Mac and then use whatever caution, tape, cardboard enclosure to ensure you don't "accidentally" reach to the protected area.
All your plugging and unplugging of USB devices can happen on the hub - physically away from the iMac.
If you're unable to get a long enough cord for the USB drive, mount it physically to the back of the Mac with double sided tape, screws, permanent adhesive to make a shelf - whatever you feel will provide you with realistic enough protection. With a routine backup, you'll not lose data and you'll only lose time if you can't engineer a decent enough setup.