Nigeria's army said Boko Haram militants took the hostages from different communities. Kidnappings have become a growing security concern across the West African country.