The existing alternative is to use a buffer and call uniform_vector_float which is overkill for such a simple operation.