An Approximation Theory for Metric Space-Valued Functions With A View Towards Deep Learning