Two Bolivian army leaders have been arrested after soldiers and tanks took up position in front of government buildings in what President Luis Arce called an attempted coup.