Use varargs instead of array where appropriate (#4513)

Change-Id: Ide9349b6afa7e56ae04b7727134971ebf81c0b03