Since you already had collected all Roof objects in an array, just use a for to iterate through them all and change their materials:
var object : GameObject[];
object = GameObject.FindGameObjectsWithTag("Roof");
var texture : Texture;
function OnMouseDown(){
for (var obj: GameObject in object){
obj.renderer.material.mainTexture = texture;
}
}