You want to make the 40 gal
a reef? I just went online and looked at what fish I could have in a 40 gal
has a minimum tank size and u just select the type of fish. Its best to put the fish in from least aggressive to most aggressive. Also depends if you are gonna set it up as a predator tank or go the other way. There are some dwarf lionfish that are really cool but keep in mind there are very few predator fish that you can have in a small tank. You would need a 180gal or bigger for a good selection. If you go the other way there are clownfish ( you can only have a pair and you can mix some of them together like a snowflake and black one but some you cant, I think mostly maroon clownfish because they are more agressive), gobies, dottybacks, wrasse some are reef safe, and others. As for coral it depends on what light you will be useing.