Dynamics of shallow elastic arches. Part II: Optimal forms