Usually, you would use a chip designed for the specific battery chemistry, so, no, you would be best to decide on that first, also the number of cells matters.
You could build a microcontroller based charger then program it only after you know the specifics of the battery.
Bob