There is no question that iPads are the easiest solution, but it’s rarely the best solution, and it’s certainly not necessary. Humanity survived for thousands of years without having iPads for kiddos at restaurants.
Thing is that statement applies to a lot of the adults (with phones) in the restaurant too. It's sad and telling.
An adult can excuse themselves, step out for some fresh air, go to the bathroom, or even go home. Knowing how and when to do that is an important skill.
Kids need that outlet too, and they need their parents to be attuned to their needs and help them manage.
If a kid is melting down at a restaurant, they need help from an adult who ought to have some idea what the child needs and how to provide it.
Too many parents seem to think their own desire for an uninterrupted meal is more important than their child's basic biological need to be able to get out of an overwhelming situation. It's not fair to trap someone somewhere they don't want to be and then blame them for becoming upset.
Mine were very happy to draw, read picture books, etc. at that age.