Temporal Talbot effect in interference of matter waves from arrays of Bose-Einstein condensates and transition to Fraunhofer diffraction