If your are talking about a towel rack that was attached to a drywall backing with mastic, and that pulled out.....this is not a good arrangement. Drywall is not a suitable surface to bond a towel rack to. If you patch that back in, you are still putting all the weight of little johnny doing chinups on the towel bar...on the crumbly plaster. Not much strength there. If the whole wall is tiled, I'm not sure how to do this better at this point.