Pretty much of all of them.
Ilima is first battled as part of the story on the marina, but he can also be battled later on after completing his trial, by going to his house in Hau'oli City Shopping District, and talking to him. He'll mention that he's researching Pokemon battling, and then he'll take you to the Trainer's School to have a battle with you. He has a Smeargle and a Gumshoos w/ a Normalium Z.
Lana can be battled after beating Olivia, by going to her house in Konikoni and talking to her twin sisters, who challenge you to a Double Battle. After defeating them, Lana arrives, and eventually battles you after being goaded on by her sisters. She has a Chinchou, a Shellder, and an Araquanid w/ a Waterium Z.
Kiawe can only be battled in Sun, and only after beating Olivia. You can find him in his room at night, where he immediately leaves for his job at the Thrifty Megamart. After going to the Megamart, he is seen talking with his boss, and then challenges you to a battle. He has a Growlithe, a Fletchinder, and a Marowak. After defeating him, he says that he just quit his job to study dance in another region, and awards you the Reverent Battle Style.
Mallow is only battled in Moon, and only after beating Olivia. She is found on the 2nd floor of the restaurant in Konikoni City, and leaves for the Lush Jungle after being spoken to for a battle. Shortly after she leaves, her older brother will ask you to ask her to look for his Wimpod. Upon going to the Lush Jungle, she'll say that Wimpod was just collecting ingredients for her family restaurant, before challenging you. She has a Phantump, a Shiinotic, and a Steenee. After beating her, she mentions how she wants to take over the family restaurant someday, and then leaves to return her brothers Wimpod.
Sophocles can be battled as one of the Title Defense challengers for the Champion. He has a Togedemaru, a Magnezone, an Electivire, a Vikavolt, and a Golem.
Acerola is part of the Elite 4 and can be battled at any time. She has a Sableye,,a Drifblim, a Dhelmise, a Froslass, and a Palossand w/ a Ghostium Z
Mina is battled both as part of the Ultra Beast storyline, and can be battled once all the trainers on the Poni Gauntlet are defeated. Both times, she has a Klefki, a Granbull, a Shiinotic, a Wigglytuff, and a Ribombee w/ a Fairium Z.
Sorry if this was too much info! Hope I could help!