One of the things that kable and htmlTable get right is that they offer a concise way to set alignment for all columns. In kable(), that's align = "llrc". One letter ("L", "R", or "C") for each column.
As a first step, could you expand halign to accept a vector of "left", "center", and "right"? If rows = NULL you simply start with the far left column and stop when you run out of elements in halign.