>>29852596>>29851103>>29851083To further explain. It's specifically 3 slots. In the programming, there's a list of pokemon. This gives its type, movepool, TM compatibility etc. Then there is ability 1, 2, and 3. 3 is the hidden ability. So if the baby is bred to have a hidden ability, it just means it has that #3 slot, and will have whatever ability is in the programming for it.
That said, unless there's some loophole built in, all Gengars transfered to the new game will no longer have levitate.