Two-time reigning IndyCar champion Alex Palou has become the first Spanish winner of the Indianapolis 500.