Integrated ferroelectric microelectromechanical systems (MEMS)