Since there are only 5 analog inputs on an Arduino you would need to use (probably several) external analog multiplexers such as 2 74hc4067 16 to 1 and 1 74hc4051 8 to 1 in core parts to get your 40 voltages multiplexed down to 3 analog input pins. Then you need to ensure the input voltages aren't too high or low for the inputs (0 to 5V) and see if you can multiplex reading all the analog values in a time acceptable to your application.
Peter