I need the functionality of all these 3 functions, but want to somehow combine them/shorten them into one function.

Generally, a good approach when refactoring similar functions is to create a single factory function that will take your variable data as arguments and return a function that has access to that data via its closure.