If you want save a list of data in sharedpreferences you can create a list of your model and serialize and deserialize with gson to save your data in shared preferences. A fast example:
Your model:
data class Coffee(
val date: String,
val description: String
)
Your serialization and deserialization:
// First, get string element of sharedpreferences and convert to a list
var itemListString = getMyCoffeesFromPreferences()
val gson = Gson()
val itemType = object : TypeToken<List<Coffee>>() {}.type
itemList = gson.fromJson<List<Coffee>>(itemListString, itemType)
// Add new elements to list, convert it to string and save it in preferences again
itemList.add(Coffee("08/07/2020","Test"))
val stringJSON = Gson().toJson(itemList)
saveMyCoffees(stringJSON)
I have not tested the code but it can help you :-|