Andrew Arrabaca, a 43-year-old Army veteran, appeared in federal court, where prosecutors alleged he plotted the attack for months.