Change-point Detection for Sparse and Dense Functional Data in General Dimensions