Numerical Methods For Optimization And Variational Problems With Manifold-Valued Data