40 fish and inverts is insane. Even 17 is too much. That will be an overstocked tank. 40 fish is would be good for maybe 400 gallons! That is IMO
too much of an ambitious wish list. The chain link is an eel and it's listed as semi-aggressive still. There is always the risk that at night it could eat a shrimp or small fish when it gets the opportunity. Eels are nearly blind, so that is instinct...to go after prey. Go by the rule 2-5 gallons per 1" of adult fish. Petco says 2 and I think LA says 5 (and I wouldn't take advice from Petco...). For example, that makes it to be around 12, 4 inch fish or some sites would suggest 9 four inch fish max. Please consider how much of a bioload this will have on the system and how it is possible for the bacteria to keep up with it. Also how these fish will be so crowded that they'll probably become more aggressive than usual. Not to mention all the food that would be needed to feed them resulting in lots of nitrates. I would suggest rethinking the stock list to include about 12 fish max (depending on size more or less).