Handling sparse and missing data in functional data analysis: a functional mixed-effects model approach