I heard that rams are bottom dwellers, im sure the corys wouldnt bother them but the red tailed shark might, are they not bottem dwellers as well? Im sure in a 40g you would be fine though rams stay small so they dont need that much space, but they do like open swimming areas i also read. I think you can pretty much house anything with rams, that arent aggressive anyways.