I am working on a project and I need to monitor a lot of sensors, just to know if there is an object in front of them. Can I use a mux to use less I/O pins and monitor all those sensors? If yes, how am I supposed to connect the HC SR04 with one pin? If no, there is any sensor that I can use just to know if there is something in front of it? (not to measure the distance of an object)
yes. The 3-pin version need a bidirectional MUX.
You can also "convert" the four-pin HC-SR04 to a three-pin version (that is, trigger with and receive echo on the same Arduino pin). See NewPing library for instructions and example.
CD4052 for 4 pin version CD4051 for 3 pin version.