get terminals by array id