Submillimeter wave generation using Josephson junction arrays