Mod, setmod and floor operators

Say you have an array with keys and values, like this [key, value, value, key, ...] and you want to get back an object {key: [<values>, ...}.  It helps to be able to perform modulo operations.  While we're at it, let's add a floor operator as well.