Variational Problems on Arbitrary Sets