Read much components on same pin

Hey guys, I'm using infrared retro-reflexive sensors, it works perfectly, but I will use more then 20, I dont want to buy an Arduino Due dor this, so I want to know if have another way to do them read HIGH or LOW on same pin, I have a 74HC595N and 3 UNL2003 APG

Datasheets:
http://www.nxp.com/documents/data_sheet/74HC_HCT595.pdf

I think that these components can only be used as Output, if i'm correct what component I need to use to be a input ? And if someone have a tutorial too will be helpful because I dont know how to work with them

If you are doing what I think you are doing (trying to read several output pins to see if they are high or not, and not use an input for each individual one) you could use OR gates, or connect them all up together. Might be a good idea to use an LED/resistor combo on each of the outputs so you know which one is high, and to prevent feedback from one chip to another on that pin.

74HC165

What is the output of the sensor? A digital signal?
If so, you can use a bank of daisy chained 74HC597s to capture the output state of each, read the data in via SPI.transfer(0), and act on any that are seen as triggered.

digitalWrite (164pulse, LOW);
digitalWrite (164pulse, HIGH); // capture the inputs
bank0 = SPI.transfer(dummyData); // inputs 0-7
bank1 = SPI.transfer(dummyData); // inputs 8-15
bank2 = SPI.transfer(dummyData); // inputs 16-23
bank3 = SPI.transfer(dummyData); // inputs 24-31

or capture the data into an array
digitalWrite (164pulse, LOW);
digitalWrite (164pulse, HIGH); // capture the inputs
bank[0] = SPI.transfer(dummyData); // inputs 0-7
bank[1] = SPI.transfer(dummyData); // inputs 8-15
bank[2] = SPI.transfer(dummyData); // inputs 16-23
bank[3] = SPI.transfer(dummyData); // inputs 24-31

74HC165 probably better, also daisychainable, 74CH597 will need another clock line input to move data from input registers to output registers, similar to HC595 for shiftOut operations.
Less expensive too