The man authorities say shot and killed an unarmed security officer at New Hampshire Hospital Friday was twice arrested in the past for charges involving firearms and was briefly hospitalized at the same psychiatric hospital in 2016, according to court records made available on Monday.