The hitter can, to a certain extent, control in what general direction the ball is going - pull side, opposite field, up the middleish - but certainly not the tiny gaps in between fielders. That's why the shifts are in place, the hitters will have a tendency to spray the ball in a certain direction but given a hard enough hit and a fair deal of luck, a groundball can still get by or make it a difficult enough play for the fielder that a hit becomes possible.