Hello and welcome.
Your problem would be much easier to help with if you provided some screenshots. It's very difficult to give advice based on a written description. It sounds like to me that you included the "image" layer when you merged the triangles. The "image" you speak of should be on it's own layer. This way you can add selections to the "image" layer with a mask and the triangles won't be a problem.
If the triangles are to be a part of the background removal/blackened bg, then just make a selection of them and then use a layer mask on the "image" layer.
(Edited to explain)
Image with rectangles...
[ATTACH=full]107150[/ATTACH]
Layers panel with individual rectangle layers.
Turn off rectangle layers, Shift + Cmd/Cntrl + Click each rectangle layers thumbnail and then add selections to the image layer using layer mask.
[ATTACH=full]107152[/ATTACH]
Layers panel with merged rectangle layers.
Turn off merged rectangle layer, Cmd/Cntrl + Click rectangle layers thumbnail and then add selections to the image layer using a layer mask.
[ATTACH=full]107153[/ATTACH]
Either way you choose to do it, the end result is rectangles surrounding items of an image with a black background.
[ATTACH=full]107154[/ATTACH]
Since I don't follow what you're trying to accomplish, that's about all I can tell you for now.