A Bolivian general has been arrested and accused of mounting a coup against the government after attempting to storm the presidential palace on Wednesday.