Artificial Intelligence and Personhood: Navigating Legal and Ethical Landscapes