Algorithm to obtain arbitrary coarrays using synthetic aperture techniques