You came here for advice from other aquarists about how to stock your aquarium. They're going to give you said advice and you may not like it. No one can force you to do anything but I'm going to give you my recommendations.
I have kept angelfish since childhood, successfully and less successfully before I knew what I was doing. With a tank that size, you could house a pair of angelfish and some other compatible additions. I wouldn't try for more angels than that. They grow to be large and can be absolute arseholes to each other, especially in cramped quarters with little cover.
Boesemani rainbowfish get to be around 4 inches long and prefer groups of at least 6. I wouldn't keep a shoal of them in anything smaller than a 55 gallon tank. If I were you, I would re-home yours and think about a smaller rainbowfish species or something else all together.
As for corydoras catfish, they are fully compatible with angels and an excellent species for a 40 gallon tank. However, as others have mentioned, they are shoaling fish, even more so than the bosemani.
Most species of shoaling fish can survive alone. Many large or active species can also survive in tanks too small for them for a good while. However, survive is about the extent of it. They will never thrive- their color and behavior will always pale in comparison to responsibly kept fish and you'll miss out. Their lifespan will also likely be shorter and stress will lead to increased risk of disease. In the case of large fish in small tanks, increased bioload will also put pressure on the system, which is terrible for water quality.
A human being can survive alone in a single tiny room provided their most basic needs are met. However, you would like to live in that room for the rest of your life?
In summary, were I in your position I would re home the rainbowfish, create a Cory shoal (or re-home that too and find a different species), get another angel and work from there. Just avoid anything that is likely to nip your angel's fins or get eaten. Best of luck. I hope you make a wise and compassionate decision.