user2155: As the title of the question says, is it possible for me to use a Set data structure for the Datum and/or Redeemer?

user255: Any type that works with PlutusTx.unstableMakeIsData (or its equivalent) should work, since Datum & Redeemer are wrappers for BuiltInData which is a "wrapper" for Data.
EDIT:
I tried the following example:
data MySampleType = Dummy (Set Bool) deriving (Show)

instance PlutusTx.FromData (Set Bool)
instance PlutusTx.UnsafeFromData (Set Bool)
instance PlutusTx.ToData (Set Bool)
PlutusTx.unstableMakeIsData ''MySampleType 

but got the following error messages:
GHC Core to PLC plugin: E042:Error: Unsupported feature: Int: use Integer instead
Context: Compiling type: Data.Set.Internal.Size
Context: Compiling data constructor type: Data.Set.Internal.Bin
Context: Compiling type: Data.Set.Internal.Set GHC.Types.Bool
Context: Compiling data constructor type: SampleStateMachine.Dummy
Context: Compiling type: SampleStateMachine.MySampleType
Context: Compiling type: SampleStateMachine.MySampleType
                         -> Plutus.V1.Ledger.Contexts.ScriptContext
                         -> GHC.Types.Bool
Context: Compiling type: Model.Bid.OrderBid
                         -> SampleStateMachine.MySampleType
                         -> Plutus.V1.Ledger.Contexts.ScriptContext
                         -> GHC.Types.Bool
Context: Compiling type: Model.Order.Order
                         -> Model.Bid.OrderBid
                         -> SampleStateMachine.MySampleType
                         -> Plutus.V1.Ledger.Contexts.ScriptContext
                         -> GHC.Types.Bool
Context: Compiling definition of: SampleStateMachine.mkValidator
Context: Compiling expr: SampleStateMachine.mkValidator
Context: Compiling expr at "sample-0.1.0.0-inplace:SampleStateMachine:(206,9)-(206,48)"

Which, to the best of my understanding, means that it's not a valid On-Chain code.
Fazit: It's currently not possible. But you could create an issue here and request the feature :)

2155: <p>As the title of the question says, is it possible for me to use a <code>Set</code> data structure for the <code>Datum</code> and/or <code>Redeemer</code>?</p>
 255: <p>Any type that works with <code>PlutusTx.unstableMakeIsData</code> (or its equivalent) should work, since <code>Datum</code> &amp; <code>Redeemer</code> are wrappers for <code>BuiltInData</code> which is a &quot;wrapper&quot; for <code>Data</code>.</p>
<p>EDIT:</p>
<p>I tried the following example:</p>
<pre><code>data MySampleType = Dummy (Set Bool) deriving (Show)

instance PlutusTx.FromData (Set Bool)
instance PlutusTx.UnsafeFromData (Set Bool)
instance PlutusTx.ToData (Set Bool)
PlutusTx.unstableMakeIsData ''MySampleType 
</code></pre>
<p>but got the following error messages:</p>
<pre><code>GHC Core to PLC plugin: E042:Error: Unsupported feature: Int: use Integer instead
Context: Compiling type: Data.Set.Internal.Size
Context: Compiling data constructor type: Data.Set.Internal.Bin
Context: Compiling type: Data.Set.Internal.Set GHC.Types.Bool
Context: Compiling data constructor type: SampleStateMachine.Dummy
Context: Compiling type: SampleStateMachine.MySampleType
Context: Compiling type: SampleStateMachine.MySampleType
                         -&gt; Plutus.V1.Ledger.Contexts.ScriptContext
                         -&gt; GHC.Types.Bool
Context: Compiling type: Model.Bid.OrderBid
                         -&gt; SampleStateMachine.MySampleType
                         -&gt; Plutus.V1.Ledger.Contexts.ScriptContext
                         -&gt; GHC.Types.Bool
Context: Compiling type: Model.Order.Order
                         -&gt; Model.Bid.OrderBid
                         -&gt; SampleStateMachine.MySampleType
                         -&gt; Plutus.V1.Ledger.Contexts.ScriptContext
                         -&gt; GHC.Types.Bool
Context: Compiling definition of: SampleStateMachine.mkValidator
Context: Compiling expr: SampleStateMachine.mkValidator
Context: Compiling expr at &quot;sample-0.1.0.0-inplace:SampleStateMachine:(206,9)-(206,48)&quot;
</code></pre>
<p>Which, to the best of my understanding, means that it's not a valid On-Chain code.</p>
<p>Fazit: It's currently not possible. But you could create an issue <a href="https://github.com/input-output-hk/plutus/issues" rel="nofollow noreferrer">here</a> and request the feature :)</p>
