You can add pets to the list of things purchasable on embark by adding [COMMON_DOMESTIC] to their raws, and making sure that they also have [PET] and a [PETVALUE:#] tag. Trolls, beak dogs, and so forth could be added doing that, though you might want to remove some so that it's a bit more manageable. I don't know how this will interact with the tags related to sentience and intelligence, though, if you try to add an intelligent slave race and then enable hauling or other labors on them with some utility.
Not sure if it's possible to prevent them from getting bad thoughts from sleeping in beds. You could mod in a bed made of rock that looks like a tile of smoothed ground, though, and call it a sleeping slab or something like that.
Don't know if goblins have nobles, but it's probably possible to mod them in, at least on 0.31.x, as nobles are editable. On 0.31.x, it's in entity_default.txt and goblins do not have nobles. In 40d, it's not in that file, and I suspect that it might not be editable.
Building a massive obsidian city seems like it would be fun. Set up a magma farm, and use it as the source. Even more awesome: making a race of dwarven slaves kept by goblins, using some utility to enable mining for them[1], and only permit them to mine. That way, it won't matter if they magma farm ends up killing most of them, because it's triggered by mining out key sections instead of by floodgates! Build a city out of the blood of dwarfs!
[1] Not sure which one does that, but I recall seeing one around. I may have imagined that, though.