Scripts for autonomous specific flight scenarios for Arduplane?

Scripted acrobatics for plane was merged into master a little while ago. Might be what you are looking for. Scripting: allow for aerobatics in AUTO mode in plane by tridge · Pull Request #19039 · ArduPilot/ardupilot · GitHub
Here is a full thread about the development of the feature. Arduplane autonomous aerobatics - #7 by andyp

ArduPilot supports running Lua scripts on the hardware Lua Scripts — Plane documentation
There are also python scripts that can be run through IronPython in Mission Planner. A python program that uses dronekit or pymavlink can be run along side Mission Planner or MAVProxy while the GCS is connected to a vehicle. The GCS options require a connection between the vehicle and the GCS which is not always a good assumption to make.

It is also possible to do it with a companion computer, but that’s extra weight and hardware and adding a new binding to Lua is fairly easy.