Senior military commanders were arrested as prime suspects in a brief attack on the presidential palace in Bolivia, reported as an attempted coup.