Structure formation at small cosmological scales provides an important frontier for Dark Matter (DM) research. Scenarios with small DM particle masses, large momenta or hidden interactions tend to suppress the gravitational clustering at small scales, inducing a cut-off in the matter power spectrum P(k) on such small scales. So far, many non-cold DM (nCDM) candidates have been proposed in order to give a better description of the structure formation and distribution at small scales, with respect to the standard cold DM (CDM) model. The details of the small-scale power suppression, usually described by the so-called transfer function T^2(k)=P_nCDM(k)/P_CDM(k), depend on the DM particle nature, allowing for a direct link between DM models and astrophysical observations. However, most of the constraints currently available refer to a very specific shape of transfer function T(k), corresponding to thermal warm DM, i.e. candidates with a Fermi-Dirac momentum distribution. Nonetheless, most of the viable dark matter candidates are not characterised by a thermal momentum distribution. In this talk, I will present a general analytical fitting formula for the transfer function T(k), which is able to reproduce a large variety of shapes in the suppression of the power spectrum. I will show that it covers the parameter space of the most popular nCDM scenarios, such as sterile neutrinos, mixed (cold + warm) models, ultralight scalar DM and other models suggested by effective field theory of structure formation. Finally, I will discuss the first astrophysical constraints on its free parameters, obtained through a comprehensive analysis of the Lyman-alpha forest data and easily translatable to bounds on the fundamental nCDM properties.