You are looking for a shift register. Takes three pins to run 8 out puts, 4pins for 16 out puts if you use two.

If I remember a part number HC595. That might be for in put. They have them for both.