How five countries – including New Zealand – have quietly created a vast network about those who come and go across their borders.