Be sure to get larger more adult sized cardinals and be sure to get young Angels.
Angels and Betta's wont do well together. Most angels will go after bettas. Female bettas are territorial as well..
If you house several betta's together Male or female you can probably expect quite a bit of aggressive behavior in the tank.
That behavior can affect all the inhabitants.
If it gives you any indication of how many fish you can have in your 40...
My 40breeder, when fully stocked, will contain...
20 ember tetras (3/4" long)
2 German Blue Rams (2.5-3" long)
1 chocolate gourami (2-.25" long)
4 otos (1.5" long)
3 Stiphodon gobies (2" long but very slender)
If your fish are small, you can put more in than you might think.