Comonotonic approximations for a generalized provisioning problem with application to optimal portfolio selection