Will the magnets in a DC motor ruin my arduino or any electronic sensor such as ultrasonic range finders or IR sensors?
If you take the motor (and therefore also the magnets) and throw it at them hard enough, there will be some damage. ;D
If you're afraid of inductive kickback, use free wheeling diodes or a dedicated motor driver. It will take care of that.
The metal housing of motors will keep most of the magnetic field inside the motor and there won't be enough of it to do mechanical damage by say deforming the membrane in a ping sensor. Magnetic fields also drop very rapidly with distance.
Unless you work with super cooled SQUIDs for measuring brain waves, I doubt you'll see any sizable effects at all.
Thank you! I really appreciate the help.