A suspect linked to the factory was arrested wearing a gas mask and carrying a knife, Japanese media reported.