What are good defenses of black King with Bishop on f8 or g7? As black, I like to return my dark square Bishop to the King after castling short. I want to develop my skills in defending that position. In what openings does it occur?

And how should one in general search for such a nameless(?) concept or strategy? Is there for example a database where one can search for Bf8 in the ten first moves?
There are a lot of openings where Black fianchettos his king's bishop, and it ends up on g7. Versus 1. d4 you have the King's Indian Defense and the Grünfeld Defense; if White opens 1. e4 you can respond with the Pirc Defense. The Modern Defense is usable against both.

Without playing g6, Black has to move his rook on f8 (after castling short) and retreat the bishop to f8. That's far less common, though there are some (side)lines in the Sicilian and the Ruy Lopez where this happens.