Do bosses take damage from lava and traps?
Usually it depends on the boss you want to kill.
Lava for instance does not damage any boss besides the Slimeking, but it can be very helpful in defeating and fast progressing the waves of invasion style events to get to those bosses the fastest.
Landmines as traps should work but will usually not get triggered by bosses and have to be triggered by the player, with the help of a wire mechanism.
A very viable tactic in damaging and easily defeating most mid-game bosses is to collect the traps from the jungle temple and building a contraption out of them. Especially Spiky Ball Traps and Spear Traps used in a way that constantly activates them does a lot of damage against most bosses and is even a viable way of killing the Golem.
If you have a arena composed of platforms you could for instance put a pillar of spiky ball traps in the middle dividing it in two sections. Then you could put pressure plates on top of the pillars so the spike balls will fire in both directions and you still have enough space to evade enemy attacks.