There must be a good standard way of doing this, however every project I work on I have to write my own unity method, or create an inline array etc.
(I hope this will quickly get closed as a duplicate of a question with some great answers on this)