Contributing the same amount from each paycheck to a 401(k) is dollar-cost averaging by default. It removes the temptation to time the market and smooths out the price you pay.
When you already have a lump sum, research generally finds that investing it all at once beats spreading it out about two-thirds of the time, because markets rise more often than they fall. Spreading it out mainly reduces regret if prices drop right after you invest.