Bayesian Hierarchical Modeling For Dependent Data With Applications In Disease Mapping And Functional Data Analysis