Let's say I have a large code base, and I need to concatenate two arrays a few times over the large code base, so I look online for the solution and find a nice little method to accomplish this.
(I could use the whole Apache Commons dependency to use their array concatenate method, but the overhead is pointless for something so niche.)
Should I therefore create a whole util class dedicated to that one function or somehow statically embed it somewhere into the code base? or? What's the convention? Because I seem to be having all of these small completely abstract util methods that would fit perfectly into an api on their own but are unrelated to each other and don't know where to put them. Blame my OCD but having a single ArrayUtils class holding a single method feels wrong, not to mention cumbersome.
I'm not trying to create an array utils library after all. Or am I?
As noted in comments this is highly subjective to the personal taste and practices of the developer.
What I would do is to create that method in a utility class based on functionality. for instance a class called StringTools for utility methods regarding String etc.
For me this makes it easier to keep track of all my utility methods. It's also easy to export it into a jar if necessary.