First of all a shoal of piranha can not live in a 40gal tank for life!
Besides that I think the only possible and I stress possible tank mates would be striped and spotted raph cats. Two reasons: one they are relativly cheap, and two they are nocturnal while Ps are diurnal, and three they are some what armored (ok so that was three). I have had a 6-7 inch stripped raph with my mixed pygo shoal with no problems at all but once I added him to my Mac tank the P did some serious minor dammage so I moved him back to my pygo shoal.
I hope to acquire a megaladorus (sp) irwini to add to my pygo shoal. I think, because I have had these fish for 8 or 9 months and I know their personalities, one would work as they are practically jsut giant stripped raph cats. Then again I could be making a costly mistake. That is the life with Ps.
Oh yeah cheap Plecs may work for awhile but....ewww