What is odd about the schematic you posted is resistor R3, which is drawn between the switch and the 24V supply. Is that the actual arrangement?
3k is a rather low value for this arrangement, 4k7-10k will drive the opto hard enough. I'd go for R3=10k, that's 2.3 mA through the opto's LED. Remove R4, use the internal pull-up on the input pin, and you can easily detect the switch.
Instead of an optocoupler you could connect the switch to a voltage divider: 47k/10k gives you 4.2V at the pin, and the high resistance offers protection against voltage spikes were they to happen.
I considered suggesting this at first, but I figured it could be too much work or you wanted to maintain the appearance of the incandescent bulbs. If you were to replace the bulbs with LEDs then I'd recommend going with addressable LEDs. You can run all of them on a single I/O line
For the annunciator, and lit buttons (Landing gear switch) we certainly want to use existing lamps. But for some basic indicator lights, it would be far easier to replace the bulb with an LED. Many of the bulbs are broken/dead, so we will certainly have some LED and some 24V bulbs. Same with switches... Some are powered, and some are simple switches.
We are trying to develop a set of standard hardware and software to drive these various panels, and then will be able to quickly code and upload a sequence to match the scene.
We have flexibility on the resistor. We are using a 24V power supply to drive all of the lights/annunciators. Most of the annunciators have an integrated pushbutton switch and use a common voltage source for the light and switch. When the switch is not pressed, there is 0V, and when pressed the voltage source (usually 24vdc) is passed through the switch.
In our application we do not need the 24V coming from the switch as we are using the Arduino to read the switch and take action.
What do you suggest would be a better location for the resistor? Just for educational purposes, why is the current location "odd"?
Based on your description: 24V is connected to the switch. A manufacturer normally doesn't add resistors, just connects power to one end, and a signal wire to the other end. So if there's a resistor, I expect it to be on the other side of the switch.
Also a 3k value is unusual (3.3k is a very common standard value), and considering a switch needs only minimal current it's quite a low value.
The most common arrangement for switches is to connect one end to the ground, and the signal wire to the other end. Makes it easier to read. I'd only expect to see it connected to 24V if you're using a negative ground system (so the positive rail being the 0V circuit reference, and negative rail at -24V), which used to be quite common but which is rare nowadays.