Aberration correction for phased-array telescopes using phase diversity