Rig Rite carries a line of toerail sections and accessories, (no prices on the page)
They seem to be becoming very rare on, esp, the newer boats on offer.
Perforated aluminum rails do offer a lot of advantages; multiple convenient places to attach blocks, fenders, bungees etc and low maintenance.
Seems to me that a number of years ago a nearly 20' section went for around $450 so doing up a 40 footer is going to run to some coin, esp if you use their end caps, chocks, and other convenient accessories.
Adapting/changing a teak toe-railed boat to aluminum may or may not be practical/possible depending on the hull/deck joint technique and/or post manufacturing access to the inside of that joint (often spotty at best, esp on liner-heavy boats). It may
be possible to screw an aluminum toerail on top of a substantial, well secured teak cap rail but then you may run into aesthetics issues.. it may 'look' odd...
However, these rails were more or less de riguer on many 80s racer/cruisers so there should be plenty of boats available that would have that feature. Many of the so-called 'blue water' boats tended to lean towards bulwarks and teak toerail caps.. some of these might be difficult to 'convert'.
Perry's Nordic line, and the less common 'Reliance 37' built in Vancouver (a sort-of little sister to the Passport 40) are a couple of examples that come to mind that were offered with minimal exterior wood and good toe rails. Somewhat ironically, our friends with a B 36.7 (a 'racy' boat) bemoan the teak rail and lack of a good aluminum toerail.