Preparation of elements or inorganic compounds except carbon dioxide