Bayesian Nonparametric Methods With Applications In Longitudinal, Heterogeneous And Spatiotemporal Data