After writing this I find it doesn't really answer your question so much as contradicts it, but if you find it satisfactory I will gladly post it as an answer.
• I don't think Ultra Beasts are Legendary Pokémon. For one, they are never referred to as Legendary in game (at least the main story, I'm not in the post-game yet.) They are only referred to as regular Pokémon. Second, you can catch multiple of certain UBs. Two Xurkitree can be captured, and [SPOILERS!] when you go to Ultra Space to find Lusamine she's surrounded by dozens of Nihilego. Now, as far as I know, there are no Legendary Pokémon with multiples (in the games, at least — the anime has baby Lugia and for some reason two Mewtwo). There are, however, multiple Mythical Pokémon like Manaphy, Shaymin and Genesect. However, given the fact that mythicals (with the exception of Deoxys in ORAS) are distributed via event, and the Ultra Beasts are not. Given this evidence, I am inclined to believe that Ultra Beasts are not Legendaries, but rather merely Pokémon from another dimension no different than a Scizor or a Hydreigon.
• Of course, Solgaleo and Lunala ARE referred to as Legendary Pokémon and they ARE Ultra Beasts (perhaps Necrozma is as well?). To me, this has one of two meanings: One, they are not actually "legendary" in the way that Groudon, Kyogre, Dialga and Palkia are — they are merely the product of folktales and legends passed down in Alolan culture. Or, the other meaning could be that Solgaleo/Lunala are Legendary Pokémon found in Ultra Space. Not every UB has to be an Legendary. But that doesn't mean that the dimension that UBs live in cannot have their version of a Legendary Pokémon.
• Finally, Type: Null and Silvally. In the game Gladion (I think) mentions how there have been many Type: Null created in an attempt to create Type: Full (which I believe is what Silvally is.) Gladion was able to save one from the Aether Foundation. Seeing as Silvally is man-made, I don not think it is a Legendary Pokémon. Now, the obvious counterexample to my conjecture is Mewtwo. However, the main difference is that Mewtwo was created with the DNA of the Legendary/Mythical Pokémon Mew, whereas Null/Silvally were not made with the body parts or juices of a Legendary Pokémon. Null/Silvally are more akin to the Porygon line, although not exactly. Porygon was created accidentally and it can breed (with Ditto.) Type: Null was created purposefully and probably not created with reproduction in mind — after all, if you have a Pokémon that can go toe-to-toe with Legendaries and Ultra Beasts, it would be bad to let it get out of your control.
• The Tapus could go either way, really.
This has a lot of assumptions and educated guesses, and is by no means an airtight theory… but that's what I think :)