A search for new light bosons decaying into muon pairs is presented using a data sample corresponding to an integrated luminosity of 35.9 fb$^{-1}$ of proton-proton collisions at a center-of-mass energy $\sqrt{s} =$ 13 TeV, collected with the CMS detector at the CERN LHC. The search is model independent, only requiring the pair production of a new light boson and its subsequent decay to a pair of muons. No significant deviation from the predicted background is observed. A model independent limit is set on the product of the production cross section times branching fraction to dimuons squared times acceptance as a function of new light boson mass. This limit varies between 0.16 and 0.45 fb over a range of new light boson masses from 0.25 to 8.5 GeV. It is then interpreted in the context of the next-to-minimal supersymmetric standard model and a dark supersymmetry model that allows for nonnegligible light boson lifetimes. In both cases, there is significant improvement over previously published limits.