For genres it is simple: In Options > Metadata > Genres leave the “Join multiple genres with” option empty. No joiner means it will be saved as multiple separate values. This is even the default.
For the artists you need some scripting in Options > Scripting. The simplest solution would be something like:
Here is a more sophisticated version which also sets albumartist and corresponding sortname tags and also removes the then obsolete custom
Not sure if the sort tags actually make sense, for actual sorting one might still prefer having all as a single value.