A new ATmega164 comes with the fuses set to run on the internal oscillator. The fuse settings are essentially independent of your code– if you set the fuse bits to continue using the internal oscillator, then it will continue to use the internal oscillator. If you set the fuse bits to require an external crystal, then you’ll need an external crystal compatible with the fuse settings that you apply.
If you want to control 128 sensors and LEDs, you’ll need 128 inputs, and 128 outputs. If you’re arranging these like the Octolively does, with one IR LED per sensor, you’ll also need 128 outputs for those LEDs. Not sure how you get there with 15 extra I/O pins through your shield plus ~14 extra LED outputs.